package org.dromara.system.domain.bo;

import org.dromara.system.domain.PayApp;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 应用列业务对象 pay_app
 *
 * @author Gavino
 * @date 2024-10-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PayApp.class, reverseConvertGenerate = false)
public class PayAppBo extends BaseEntity {

    /**
     * 应用ID
     */
    private Long appId;

    /**
     * 密钥
     */
    private String appSecret;

    /**
     * 网关地址
     */
    private String gateway;

    /**
     * 轮询组ID
     */
    private Long groupId;

    /**
     * 商品类型
     */
    @NotNull(message = "商品类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer goodsType;

    /**
     * 吃单比例
     */
    @NotNull(message = "吃单比例不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal ratio;

    /**
     * 吃单最小值
     */
    private BigDecimal ratioMin;

    /**
     * 吃单最大值
     */
    private BigDecimal ratioMax;

    /**
     * 吃单计算时间
     */
    private Date ratioTime;

    /**
     * 是否传邮箱
     */
    private Integer needMail;

    /**
     * 风控策略ID
     */
    private Long policyId;

    /**
     * 24小时失败次数
     */
    private Integer failCount;

    /**
     * 24小时成功次数
     */
    private Integer successCount;

    /**
     * 总额度
     */
    private BigDecimal totalLimit;

    /**
     * 价格插件
     */
    private String pricePlugin;

    /**
     * 强制修改价格
     */
    private Integer priceForce;

    /**
     * 额度刷新时间
     */
    private String refreshTime;

    /**
     * 刷新是否自动上线
     */
    private Integer refreshAutoUp;

    /**
     * 状态
     */
    @NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 商户ID
     */
    private Long clientId;

    /**
     * 代理人ID
     */
    private Long agentId;

    /**
     * 轮询组名称
     */
    private String groupName;

}
